﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;

namespace Ec.NETCoreFramework.Common.Core
{
    /// <summary>
    /// 分页查询对象
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class PageQuery<T>
    {
        /// <summary>
        /// 查询条件
        /// </summary>
        public Expression<Func<T, bool>> QueryExp { get; set; }

        /// <summary>
        /// 排序条件
        /// </summary>
        public Expression<Func<T, object>> OrderByExp { get; set; }

        /// <summary>
        /// 当前页
        /// 默认值1
        /// </summary>
        public int PageIndex { get; set; } = 1;
        /// <summary>
        /// 每页大小
        /// 默认值20
        /// </summary>
        public int PageSize { set; get; } = 20;
        /// <summary>
        /// 1正序 2 倒序
        /// </summary>
        public bool IsAsc { get; set; }


    }
}
